/*
 * This file is part of the GUI_SDK.
 *
 * Copyright (c) 2019-2019 Link-Card.Co.Ltd. All rights reserved.
 *
 * Authors:
 *    JiangYong <1556631285@qq.com>
 *
 * Permission is hereby granted, free of charge, to any person obtaining
 * a copy of this software and associated documentation files (the
 * 'Software'), to deal in the Software without restriction, including
 * without limitation the rights to use, copy, modify, merge, publish,
 * distribute, sublicense, and/or sell copies of the Software, and to
 * permit persons to whom the Software is furnished to do so, subject to
 * the following conditions:
 *
 * The above copyright notice and this permission notice shall be
 * included in all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
 * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
 * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
 * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
 * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 *
 * Function:  header file
 * Created on: 2019-10-05
 */

#ifndef _MENU_H_
#define  _MENU_H_

#include <stdio.h>
#include <SDL2/SDL.h>
#include <SDL2/SDL_image.h>
#include <SDL2/SDL_ttf.h>

#include "event.h"

#define GUI_VERSION "1.18"

typedef enum {
	EGUI_INIT = 0,
	EGUI_UPDATE,
	EGUI_ERR,
} EGUI_Actions;

typedef struct {
	SDL_Renderer *renderer;
	/* 2-screen */
	SDL_Texture	*not_connected_Texture;
	/* common icon */
	SDL_Texture	*wifi_signal_Texture[6];
	/* 3-screen */
	SDL_Texture	*tip_Texture;
	SDL_Texture	*icon_select_Texture;
	SDL_Texture	*bg_sel_Texture[2][2];
	SDL_Texture	*bg_connect_Texture[2];
	SDL_Texture	*list_wifi_signal_Texture[4];
	/* 4-screen */
	SDL_Texture	*password_frame_Texture;
	SDL_Texture	*list_bar_sel_Texture[2][3];
	/* Version */
	SDL_Texture	*bg_ver_info_top_Texture;
	SDL_Texture	*bg_ver_info_Texture;
	SDL_Texture	*bg_update_Texture;
	SDL_Texture	*update_sel_Texture[2];

	TTF_Font *tft_font_16;
	TTF_Font *tft_font_19;
	TTF_Font *tft_font_20;
	TTF_Font *tft_font_24;
	TTF_Font *tft_font_28;
} icon_normal_t;

void update_menu_normal(icon_normal_t *menu, void *pso);
void update_menu_search_wifi(icon_normal_t *menu, void *pso);
void update_menu_password(icon_normal_t *menu, void *pso);
void update_menu_ver_info(icon_normal_t *menu, void *pso);
void update_menu_update(icon_normal_t *menu, void *pso);

#endif